<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
    
</head>

<body>
    <div id="app">
        <!-- 遍历数组 -->
        <div v-for="(item,index) in list">
            {{item}}==={{index}}
        </div>
        <div v-for="item in arr">
            {{item.id}}
        </div>
        <!-- 遍历对象 -->
        <div v-for="(value,key,index) in obj"></div>
        {{value}}:{{key}}:{{index}}
    </div>
    <!-- 遍历数字 -->
    <div v-for="num in 5">
        10
    </div>
</body>
<script>
    const vm = new Vue({
        el: '#app',
        data: {
            list: [1, 2, 3, 4],
            arr: [{
                id: 1,
                title: 't1',
            }, {
                id: 2,
                title: 't2'
            }],
            obj: {
                age: 18,
                name: 'zs',
            }
        },
        methods: {

        }
    })
</script>

</html>